<!-- eslint-disable vue/multi-word-component-names -->
<template>
  <div>
    <div id="container">

      <div id="header" >
      </div>

      <div id="navigation">
        <ul>
          <li class="selected"></li>
          <li><a href="../index.html">首页</a></li>
          <li><a href="../jieshao.html">系统介绍</a></li>
          <li><a href="../zhinan.html">审报指南</a></li>
          <li><a href="../login.html">项目申报</a></li>
          <li><a href="../lianxi.html">联系我们</a></li>
          <li></li>
        </ul>
      </div>

    </div>
    <div id="container">
      <div id="content2">
        <table width="100%" height="41" border="0" align="center" cellpadding="0" cellspacing="0">

          <tr>
            <td height="4" colspan="2" align="left" valign="bottom"></td>
          </tr>
          <tr>
            <td height="15" align="left" valign="top">&nbsp;</td>
            <td height="15" align="left" valign="top" class="12">
              <table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="20" align="center">
                    <div class="right_proaducts">
                      <div align="left">我的位置&gt;&gt;科技项目申报&gt;单位信息</div>
                    </div>
                    <el-form ref="form" :model="update" label-width="80px">

                      <el-form-item label="单位名称">
                        <el-input v-model="update.unitname"></el-input>
                      </el-form-item>

                      <el-form-item label="单位地址">
                        <el-input v-model="update.address"></el-input>
                      </el-form-item>

                      <el-form-item label="单位法人">
                        <el-input v-model="update.corporation"></el-input>
                      </el-form-item>

                      <el-form-item label="注册资金">
                        <el-input v-model="update.investment"></el-input>
                      </el-form-item>

                      <el-form-item label="单位性质">
                        <el-input v-model="update.type"></el-input>
                      </el-form-item>

                      <el-form-item label="单位电话">
                        <el-input v-model="update.tel"></el-input>
                      </el-form-item>

                      <el-form-item label="单位邮箱">
                        <el-input v-model="update.email"></el-input>
                      </el-form-item>

                      <el-form-item label="单位传真">
                        <el-input v-model="update.fax"></el-input>
                      </el-form-item>

                      <el-form-item label="单位邮编">
                        <el-input v-model="update.zipcode"></el-input>
                      </el-form-item>
                      <el-form-item label="单位邮编">
                        <el-input v-model="update.introduction" type="textarea"></el-input>
                      </el-form-item>
                      <el-form-item>
                        <el-button type="primary" @click="updateProject()">修改</el-button>
                      </el-form-item>
                    </el-form>
                  </td>
                </tr>
              </table>
              <br />
              <div class="table_wz"></div>
            </td>
          </tr>
        </table>
      </div>
    </div>

  </div>
</template>

<script>
import axios from '../../utils/Myaxios'
const options = {
  data() {
    return {
      update: {
        unitname:'',
        address:'',
        corporation:'',
        investment:'',
        type:'',
        tel:'',
        email:'',
        fax:'',
        zipcode:'',
        introduction:''
      }
    }
  },
  mounted() {

  },
  methods: {
//数据回显
    async get(){
      const _axios = axios.create({
        baseURL: 'http://localhost:8080',
        withCredentials: true
      })
      const resp = await _axios.get('/units/get')
      this.update = resp.data.data;
    },

    async updateProject() {
      const _axios = axios.create({
        baseURL: 'http://localhost:8080',
        withCredentials: true
      })
      await _axios.post('/units',{},{
        params:{
          update: this.update
        }
      })

    }
  }

}
export default options
</script>

<style>
@import '../../assets/static/andreasblue.css';
</style>